vertex_begin

Begin the definition of a custom primitive.

语法:

vertex_begin(buffer, format);


参数 描述
buffer The buffer to be written to.
format The vertex format to use.


返回: N/A(无返回值)


描述

With this function you begin the definition of a custom primitive. You assign a buffer to write the primitive to, and the vertex format to use (previously defined using the vertex format functions). You would then define the necessary points for each vertex of the primitive before calling vertex_end to finalise the primitive creation.


例如:

vertex_format_begin();
vertex_format_add_position();
vertex_format_add_colour();
vertex_format_add_textcoord();
v_format = vertex_format_end();
v_buff = vertex_create_buffer();
vertex_begin(v_buff, v_format);

The above code will define a new vertex format, create a new buffer and start the definition process of a new primitive.


上一页: Building Primitives
下一页: vertex_colour
© Copyright YoYo Games Ltd. 2018 All Rights Reserved